Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Numbers Being Printed In Application (SDL)
Forum Updated to NodeBB v4.3 + New Features

Numbers Being Printed In Application (SDL)

Scheduled Pinned Locked Moved Game Development
3 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dan369
    wrote on last edited by
    #1

    *Firstly i should point out the fact that currently i am not rendering or drawing any text to the screen! *

    So in my basic SDL application, literally right now all i have is a few basic functions and a window appearing, i have this rather strange issue.
    I think it is best explained with an image of the issue;
    !http://i50.tinypic.com/seulcm.png(Issue)!

    I am literally quite puzzled as to what this actually might be. I mean all i have is a basic, bare window up and running. Nothing else. The only QT thing that appears is "qtcreator_process_stub.exe".
    My SDL Window is OpenGL enabled as i plan on using SDL as the backend for basic input and the like, and openGL for rendering.

    Any ideas on why this is happening?
    *I also have a slightly off topic seconded question, as to enquiring about qtcreator_process_stub.exe, what does that actually do? And is their a way of stopping that appearing?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MalcolmD
      wrote on last edited by
      #2

      I just had this issue with that qtcreator_process_stub.exe. First, make sure your profile is set up for a windows application, and not console.

      i.e., in your .pro file:
      CONFIG += windows
      CONFIG -= console

      Second, the window will appear when you start your program from QT Creator anyway. But when you start it by clicking on it in windows, the window will not appear, and so it won't be an issue for your program as it is distributed.

      As to the SDL problem, no idea. I can't even get a test program to compile, and I don't need it yet, so I really have no idea. I think i would try clearing the screen though, it must just be an artifact left over from initialization.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MalcolmD
        wrote on last edited by
        #3

        ok, I got the test to compile, no funny numbers on the screen. what compiler are you using? For mingw, if you get the "SDL-devel-1.2.15-mingw32.tar.gz" file from the SDL website, then set the SDL_DIR below to match where you put it, then:

        @TEMPLATE = app

        CONFIG += windows
        CONFIG -= console
        CONFIG -= app_bundle
        CONFIG -= qt

        SOURCES += SDL_TEST.cpp

        SDL_DIR = C:/Users/Malcolm/comp_stuff/sdl_mingw/SDL-1.2.15

        LIBS += -L$${SDL_DIR}/lib -lmingw32 -lSDLmain -lSDL

        INCLUDEPATH += $${SDL_DIR}/include/SDL
        DEPENDPATH += $${SDL_DIR}/include/SDL

        @

        should compile:

        @/*
        *SDL_TEST.cpp. do not use this file under any circumstances. it will probably blow up
        *your computer.
        *
        */

        #include <cstdio>
        #include <Windows.h>
        #include <SDL.h>
        #include <gl/GL.h>
        #include <gl/GLU.h>

        using namespace std;

        int main(int argc, char **argv)
        {
        SDL_Surface *screen;

         /* Initialize defaults, Video and Audio */
        if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) { 
            printf("Could not initialize SDL: %s.\n", SDL_GetError());
            exit(-1);
        }
        

        SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 0 );
        screen = SDL_SetVideoMode(1920, 1080, 32, SDL_HWSURFACE | /SDL_FULLSCREEN |/ SDL_OPENGL /| SDL_DOUBLEBUF/);

        SDL_Delay(1000);

        SDL_Quit();
        

        return 0;
        }

        @

        anyhow that worked for me. If you're not using mingw, I would think it shouldn't be too tough. btw, mingw and directx FTW.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved