Jump to content
  • Advertisement

noname999

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About noname999

  • Rank
    Newbie

Personal Information

  • Interests
    Programming
    QA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. noname999

    understanding viewport opengl

    @ a light breeze Most of the GLFW tuturials comes with SDL. @ Zakwayda For windows i got a window that can be with and without border. a few resolutions(hard code) that can change by a button (object linked to class). Some text that change when klicking on a button (screen flash becose the window get destroyed and recreated). None are persistand. buttons tend to overlap Using the wrong tools is just a pain and that is what i learned. Also i did had a text based game before going to opengl (perhaps a bit to soon) writers most of the time asume you continue writing code with previous example. i asume that in the example shows the code that makes the example work. i don't have other ppl to ask becose the ppl i know don't do code. i've learned that c++ for linux often opens with void() or main() for windows c++ often opens with int main () both are correct and can be used on different senario. int main () works for both and void works a bit more specific for windows therefore is int main() sometimes beter to be used. (i might be wrong but that is how i got some code working)
  2. noname999

    understanding viewport opengl

    tnx the GLFW got me going. i hoped that i did not need it but it seems that i otherwise have to use to manny OS pecific commands. GLFW now takes care of that. the modern c++ (17) has some different syntax. most of the commands are similar. works like a charm (yes i use the new books to make the program) i only hope that the gpu of a frend (tester) support the opengl (ati HD 7950). should word on paper.
  3. noname999

    understanding viewport opengl

    i already learned that system specific headers can be shifted using preprocessing. for some tasks i arranged seperate files that are going to hande platform(windows, linux) specific tasks. yes i have to learn alot and have alot of pre-assumptions about things. like windows.h won't work on linux becose it uses the win32 api. i hoped that opengl that is cross platform could be used with unified code. perhaps there is a great book for crosplatform becose i only find some books with java or not so great without opengl that says crossplatform "gui development"/"game developer" that was text based
  4. noname999

    understanding viewport opengl

    i have some thing working under windows int main() { void WINAPI glViewport(GLint, GLint, GLsizei, GLsizei); }; hoped i did not have to use the winapi. how will this winapi function under linux? i know i should test befor asking... @ CrazyCdn <stdlib.h> was from test and forgot to remove. can be ignored
  5. noname999

    understanding viewport opengl

    Dear fleabay , some examples that i come accros are from the opengl site that would sugeste: int main() { void GL_VIEWPORT(0, 0, 800, 600); } gives syntax error. and you are right the c++ book seems to be from 2001......😖
  6. Dear gamedev, i'm trying to understand the opengl viewport. As i understand viewport is used for the resolution. first question: what i learned is that for windows i need <windows.h>, <gl/gl.h>, <gl/glu.h> and <stdlib.h> for linux <windows.h> can be replaced with <x11/lib.h> is this correct? second question is about the viewport and like some explanation why i did get errors. i expect to get a window with border and a error that no materix and/or no collor is defined. first code: int main(void) { GL_VIEWPORT(0, 0, 800, 600); } result ERROR: term does not evaluate to a function taking 4 arguments. second code: void display() { glViewport(0, 0, 800, 600); } result: ERROR: entry point must be defined. last question: why can't the resolution directly be placed in the viewport and what is the difference in the GL_VIEWPORT or glViewport? i'm using c++ and try to prevend the use of aditional frameworks (keep it basic). as you figgured out i try to program crossplatform.
  • 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!