Jump to content
  • Advertisement

pheserus

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

100 Neutral

About pheserus

  • Rank
    Newbie
  1. Greetings, I'm currently trying to find the proper glBlendFunc for a 2D image in glOrtho mode, that hides the black pixels of a texture and allows for changing the transparency of the rest of the pixels with glColor4f. It seems to work with glBlendFunc(GL_SRC_ALPHA, GL_ONE). But that also makes the texture semi-transparent even when the alpha in glColor4f is set to 1. Also when 2 objects are touching, the one that should be behind the other looks to be in front of it when that glBlendFunc is applied. So does anyone know the proper glBlendFunc I should use or how to make the other one work right? I greatly appreciate any response.
  2. pheserus

    Texture Mapping by Pixel.

    Thanks for that example! Seem's to be exactly what I'm looking for. I'll go give it a try. Edit: Worked out great! Thanks again!
  3. Good day. I'm learning to use OpenGL, and I've come across a little issue I can't seem to figure out on my own. I previously used SDL rendering and I would always use SDL_Rect's to clip pieces of images to blit onto SDL_Surface's. I see this can be done with OpenGL Textures though use glTextCoord2f and similar functions. But they use floats for the percentage size of the image and not specific pixel coordinates like in SDL. So as you might guess, I've come to ask is it possible to enter the exact pixel coordinates like in SDL on OpenGL? Or how would I properly map the textures with glTextCoord to get the desired effects? Or perhaps I should create a pre-clipped surface in SDL and convert it to an OpenGL texture. Thank you for your time. If you have any advise that would steer me in the right direction, I would be much appreciate hearing it. Sorry if this has already been asked before.
  4. pheserus

    Strange Mingw Linker Problem

    Renamed it to what!? You really don't want to go round renaming system libraries. It is named correctly. Perhaps it would help if you gave the entire linker output and command line. [/quote] I named it from libopengl32.a to libopengl. I only renamed it to test out what Ohforf said, then changed it back. Anyways I decided to try cross compiling with CodeBlocks instead of in a terminal and now it works. It gave me the same linker errors in CodeBlocks until I went to Project>Build Options>Linker Settings, and added each of the SDL libraries with the exact file path under Link Libraries. I'm glad I found a method that works, though I might revisit this issue to sort it out one day. Thanks for all the help.
  5. pheserus

    Strange Mingw Linker Problem

    I tried re-ordering the OpenGL libraries but it made no difference, and I don't know how to properly order the others. I renamed libopengl32.a and it gave me this. Which is even more puzzling than before. /usr/lib/gcc/i586-mingw32msvc/4.4.4/../../../../i586-mingw32msvc/bin/ld: cannot find -lopengl32[/quote] I am cross compiling win32 from linux. I never seemed to have this problem cross compiling until now. All files were compiled with i586-mingw32msvc-g++, and yes I have used both -l and -L to specifiy the files and paths. Thanks for both of your help by the way.
  6. Hello people of gamedev.net, this is my first post here, and its about a strange issue I've been having with the i586-mingw32msvc compiler. I'm using Xubuntu and I'm trying to compile a win32 application that uses SDL and OpenGL. It compiles properly, but I'm having trouble linking the SDL and OpenGL libraries "-lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf -lopengl32 -lglu32". I don't think it is properly locating the libraries because it gives me tons of undefined reference errors. undefined reference to `_Mix_PlayMusic' undefined reference to `_glLoadIdentity@0' undefined reference to `_glTranslatef@12' undefined reference to `_SDL_GetTicks' undefined reference to `_TTF_RenderText_Blended' And many more... [/quote] When I compile it for linux (g++) it works properly. But not for Windows (i586-mingw32msvc-g++). I don't know what else to do to set up mingw. I have installed the windows version of the SDL libraries into /usr/i586-mingw32msvc/lib and tried using the -L option to specify a linker search path. But to no avail.If anyone has any clue to what I should do, I would greatly appreciate it if you would share your wisdom. If you need any other details, just let me know.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!