PDA

View Full Version : 2 questions: making a FAST title screen and a linker warning



Structural
01-16-2003, 09:31 PM
First, the most important question:
I'm trying to make a title screen for my very first game, with a nice picture and logo. What I do now is I switch to ortho mode, draw a quad all over the screen, and texture it with the logo. Here, at work behind my pentium2 266, I get about half a FPS when drawing this single quad. This is not acceptable.
Are there any techniques to solve this problem? I would still like to be able to draw with OGL to the screen, dispite any new techniques.

Secondly, not as important, I got a linker warning yesterday when I linked a jpeg library with my project:

LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library

Where does this warning come from? And how can I get rid of it? I linked the lib in-code in one single header file.

Thank you!

mikael_aronsson
01-16-2003, 10:40 PM
Hi !

What kind of video hardware do you have ?

If a library is compiled with different options /MT /MD for example and so on you get this error.

You can also get it if some part is using static linking and another part is using dynamic (dll) linking.

Many times it works fine if you just add the switch and supply the libraries by hand, it depends a little on how the different parts are compiled.

Mikael

Structural
01-16-2003, 10:57 PM
I have found the solution to the linker problem. I have to exclude the libc.lib in my VC++ project.
To change the question a tad: How can I do this in-code? This problem is specific to a single include file, and I don't want to change all my projects because of this.

padlamoij
01-16-2003, 11:06 PM
are you using a jpeg for your texture?
make sure you are not reloading / rebinding the texture each frame. Other than that beats me.

Structural
01-16-2003, 11:18 PM
Yes, I use a jpeg...
I load the texture from disk only once, at statup, after that I rebind the texture each frame to the quad because I'm using a second texture (for buttons) on that same screen.

HS
01-17-2003, 04:58 AM
Mostlikley you request a pixelformat that is not accelerated on your 3D card so your are getting software rendering.

Use glGetString(GL_VENDOR) if it says "Microsoft GDI Generic" you are in software rendering mode.

Hope that helps,

01-19-2003, 06:01 PM
Can't you draw static textures only at the startup and everytime the window is resized or moved instead of every frame?

shinpaughp
01-19-2003, 08:14 PM
For your splash screen or title screen if it does not include any animation (static), just call your function once with a single SwapBuffer call. Then use a timer or check for mouse click to move on to other screen.

There is no need to swap buffer if it is a static image. And if you need to highlight menu items just swap the buffer when the mouse is actually over the item.

As for the linker issue, you can change some setting for specific files within MSVC. When in the Project settings choose a specific file from the list on the left, preferably an implementation file (.c, .cpp) and choose the C/C++ tab on the right and add the /NODEFAULTLIB:library line to the preprocessor definitions. This should work, though I have nothing to test it with.

Hope this helps and that I understood the problems correctly.

Good luck,
shinpaughp